package com.information.manage.basic.service.impl;

import com.information.manage.basic.model.query.FindStaffByDepQuery;
import com.information.manage.basic.model.vo.DepMappingStaffVO;
import com.information.manage.basic.common.result.Result;
import com.information.manage.basic.mapper.RelStaffDepMapper;
import com.information.manage.basic.service.RelStaffDepService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


@Service
public class RelStaffDepServiceImpl implements RelStaffDepService {

    @Resource
    private RelStaffDepMapper relStaffDepMapper;

    @Override
    public Result<List<DepMappingStaffVO>> findStaffByDepId(FindStaffByDepQuery findStaffByDepQuery) {
        List<DepMappingStaffVO> resultList = relStaffDepMapper.findDepMappingStaff(findStaffByDepQuery.getDepartmentId());
        return Result.ok(resultList);
    }

}
